POV-Ray : Newsgroups : povray.general : Problems with mesh2 and uniform normals : Problems with mesh2 and uniform normals Server Time
7 Nov 2024 11:34:31 EST (-0500)
  Problems with mesh2 and uniform normals  
From: FlyerX
Date: 17 Oct 2003 00:05:01
Message: <web.3f8f6510af4cd4389d6b971d0@news.povray.org>
I have a mesh2 object where I defined all the vertex normals to be the same
regardless of the original face orientation. I expect this mesh to be
rendered with a constant color sice all its normals are in the same
direction. But when the mesh is rendered in POV-Ray the face orientation
still affects the appearence of the surface. Maybe it has to do with the
way POV-Ray does the rendering. Is there a way to force POV-Ray to not take
into account the real face orientation and use the normals only?

In fact if I remove the normal_vectors and normal_indices sections from the
mesh2 statement I get no change in the rendered image. Is like POV-Ray does
not take into account the normals at all if they are defined this way.

I am using POV-Ray 3.5 on Windows 98

thanks for any information on this,

FlyerX

Below is a small sample POV code with 4 faces as seen from the top to
illustrate the issue.

camera {perspective
        up <0,1,0>
        right <-1.310938,0,0>
        location <-1.800633,-0.1000352,19.58355>
        look_at <-1.800633,-0.1000352,18.58355>
        angle 54.4521 // horizontal FOV angle
        translate <1.4725,0,-2.579> }

//single light
light_source {<-1.800633,-0.1000352,19.58355>
              color rgb <1,1,1> parallel
              point_at <-1.800633,-0.1000352,0>}

mesh2{
vertex_vectors{6,
<2.5,4.33,0>,<-5,0,0>,<2.5,-4.33,0>,
<-3.972,6.88,-5.158>,<-3.972,-6.88,-5.158>,<7.945,0,-5.158>
}
normal_vectors{ 6, //all the same vectors
<0,0,1>,<0,0,1>,<0,0,1>,<0,0,1>,<0,0,1>,<0,0,1>
}
texture_list{1, texture{pigment {color rgb <1,1,1>} }}
face_indices{4,
<1,4,2>,0, <2,5,0>,0, <0,1,2>,0, <0,3,1>,0
}
normal_indices{4,
<1,4,2>,<2,5,0>,<0,1,2>,<0,3,1>
}
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.